{extend name="public/common"} {block name="body"}
<style>
    .paginate_button{
        border: 1px solid #ccc;
        cursor: pointer;
        display: inline-block;
        margin-left: 2px;
        text-align: center;
        text-decoration: none;
        color: #666;
        height: 26px;
        line-height: 26px;
        padding: 0 10px;
        font-size: 14px;
    }
    .current{
        background: #5a98de;
        color: #fff;
    }
</style>
<div class="cl pd-5 bg-1 bk-gray mt-20">
{if condition="$type == 'live' || empty($type)"}
	<span style="margin-left:10px;" class="l">总存款：<span style="color:red;">{$sum.live ? $sum.live : 0}</span></span>
	{/if}
	{if condition="$type == 'take' ||  empty($type)"}
	<span style="margin-left:10px;" class="l">总取款：<span style="color:red;">{$sum.take ? $sum.take : 0}</span></span>
{/if}
{if condition="empty($type)"}
	<span style="margin-left:10px;" class="l">总返水：<span style="color:red;">{$sum.fs ? $sum.fs : 0}</span></span>
	<span style="margin-left:10px;" class="l">总彩金：<span style="color:red;">{$sum.caijin ? $sum.caijin : 0}</span></span>
	<span style="margin-left:10px;" class="l">总返佣：<span style="color:red;">{$sum.agent ? $sum.agent : 0}</span></span>
	<span style="margin-left:10px;" class="l">盈亏：<span style="color:red;">{$sum.live-$sum.take}</span></span>
{/if}
</div>
<div class="text-c" style="padding :20px 0;">
<form action="{:url('member/checkAccessList')}?user={$user}&type={$type}" enctype="application/x-www-form-urlencoded" method="get" style="margin-left:20px;float:left;">
   <input type="hidden" name="user" value="{$user}">
    存取时间从：
    <input type="text" name="startTime" value="{$startTime}" id="sDate1" onfocus="WdatePicker({minDate:$('#logmin').val()})" id="logmin" class="input-text Wdate" style="width:120px;">
     到：
    <input type="text" onfocus="WdatePicker({minDate:$('#sDate1').val()})" name="endTime" value="{$endTime}" id="sDate1"  class="input-text Wdate" style="width:120px;margin-right:15px;">
    <button class="btn btn-success" type="submit" style="margin-right:20px;"><i class="Hui-iconfont">&#xe665;</i> 搜索</button><span>（默认为近30天的存取记录）</span>
  </form>
  </div>
<div class="page-container">
      <div id="tab-system" class="HuiTab">
        <div class="tabCon">
          <div class="mt-20">
            <table class="table table-border table-bordered table-bg table-hover table-sort table-responsive">
              <thead>
                <tr class="text-c">
                  <th>操作金额</th>
                  <th>操作时间</th>
                  <th>操作类型</th>
                  <th>操作人员</th>
                </tr>
              </thead>
              <tbody>
              {volist name="live" id="item"}
                <tr class="text-c">
                  <td>
                    {if condition="isset($item.agent)"}
                        {if($item.je>0)} <a style="text-decoration:underline;" href="javascript:;" onclick="parent.layer_show('{$item.time}佣金列表','/admin/statistics/commissionDetail?name={$item.agent}&in={$item.time}')">+{$item.je}</a> {else/} 0 {/if}</td>
                    {else/}
                        {:isset($item.je) ? '+'.$item.je : '-'.$item.txje}
                    {/if}
                  </td>
                  <td>
                      {if condition="isset($item.agent)"}
                        {$item.time}
                      {else/}
                        {$item.time|date="Y-m-d H:i:m",###}
                      {/if}
                  </td>
                  <td>
                  	{if condition="isset($item.type)"}{$item.type}{/if}
                  	{if condition="isset($item.fsbl)"}返水{/if}
                  	{if condition="isset($item.kkliyou)"}手工扣款{/if}
                  	{if condition="isset($item.ifck)"}取款{/if}
                  	{if condition="isset($item.zzhdid)"}彩金发放{/if}
                  	{if condition="isset($item.agent)"}返佣金{/if}
                 </td>
                  <td>{$item.czadmin ? $item.czadmin : '系统自动'}</td>
                </tr>
                {/volist}
              </tbody>
            </table>
          </div>
            <div class="dataTables_paginate paging_simple_numbers" style="width:100% ;margin: 10px 0 10px 0 ">
                <span style="float:right;margin-left:-2px;">总共{$pages}页  当前第{$page}页 ，共{$total}条</span>
                {if($pages > 1)}
                <div style="float:left;">
                    <ul class="am-pagination am-fr">
                        {if($page > 1)} <a href="javascript:;" class="paginate_button" onclick="location.search+='&page=1';">首页</a> {/if}
                        {if($page-1 > 0)} <a href="javascript:;" onclick="location.search+='&page={$page-1}';" class="paginate_button">上一页</a> {/if}
                        {if($page-2 > 0)} <a href="javascript:;" onclick="location.search+='&page={$page-2}';" class="paginate_button">{$page-2}</a> {/if}
                        {if($page-1 > 0)} <a href="javascript:;" onclick="location.search+='&page={$page-1}';" class="paginate_button">{$page-1}</a> {/if}
                        <a class="paginate_button current">{$page}</a>
                        {if($page+1 <= $pages)} <a href="javascript:;" onclick="location.search+='&page={$page+1}';" class="paginate_button">{$page+1}</a> {/if}
                        {if($page+2 <= $pages)} <a href="javascript:;" class="paginate_button" onclick="location.search+='&page={$page+2}';">{$page+2}</a> {/if}
                        {if($page+1 <= $pages)} <a href="javascript:;" onclick="location.search+='&page={$page+1}';" class="paginate_button">下一页</a> {/if}
                        {if($pages > $page)} <a href="javascript:;" class="paginate_button" onclick="location.search+='&page={$pages}';">末页</a> {/if}
                    </ul>
                </div>
                {/if}
            </div>
        </div>
      </div>
  </div>
  {/block}
  {block name="js"}
<script type="text/javascript" src="__SYSMET__/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript">
    $(function() {

        $('.skin-minimal input').iCheck({
          checkboxClass : 'icheckbox-blue',
          radioClass : 'iradio-blue',
          increaseArea : '20%'
        });
        $("#tab-system").Huitab({
          index : 0
        });
      });
    
    </script>
  {/block}